<?php
	session_start();
	
	//Check for correct user privileges
	if(isset($_SESSION['privileges'])){
		if($_SESSION['privileges']=='1'){			//Allow access to the admin backend
			header('Location: ./admin/');
		}
		if($_SESSION['privileges']=='2'){			//Allow access to the admin backend
			header('Location: ./cultural/');
		}	
	}
	else{
		$html = '<html>';
			$html .= '<head>';
				
				//Set charset = utf-8
				$html .= '<meta http-equiv="content-type" content="text/html;charset=utf-8" />';
					
				//Google Maps API key
				$html .= '<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ"></script>';
					
				//ExtJS implementation
				$html .= '<link rel="stylesheet" type="text/css" href="./js/lib/ExtJS-3.3.1/resources/css/ext-all.css" />';
				$html .= '<script type="text/javascript" src="./js/lib/ExtJS-3.3.1/adapter/ext/ext-base.js"></script>';
				$html .= '<script type="text/javascript" src="./js/lib/ExtJS-3.3.1/ext-all.js"></script>';
					
				//OpenLayers implementation
				$html .= '<script type="text/javascript" src="./js/lib/OpenLayers-2.13.1/OpenLayers.js"></script>';
					
				//GeoExt implementation
				$html .= '<script type="text/javascript" src="./js/lib/GeoExt-1.1/script/GeoExt.js"></script>';
					
				//App specific implementations
				$html .= '<script type="text/javascript" src="./js/publicAppConfig.js"></script>';	
					
				//App specific styles
				$html .= '<link rel="stylesheet" type="text/css" href="./css/style.css" />';		
			$html .= '</head>';
			$html .= '<body>';
			$html .= '</body>';
		$html .= '</html>';

		echo $html; 
	}	
?>